--- 测试 redis script 执行异常回调
redis.call("SELECT", 2)

local key = KEYS[1]
local value = ARGV[1]
local timeout = tonumber(ARGV[2])

if redis.call("SET", key, value, "EX", timeout, "NX") then
    return true
end
return false

